This invention relates to methods and apparatus for querying databases and obtaining the results from such queries. In a typical database management system, an application system is used to generate queries and present results retrieved in response to those queries from a database system. Numerous vendors such as Oracle and IBM, provide relational database management systems. Many vendors also provide application systems or application servers, for example, implementing them as a Java Servlet. An example of a query is a request made in structured query language or SQL.
FIG. 1 is a block diagram of a typical current state of the art system in which an application system queries a database system. As shown there, the application system 10b is connected to a database system 40b over a network 1b. Network 1b will typically be provided by a local area network (LAN) or a wide area network (WAN). Both the application system in 10b and the database system 40b are connected to a storage system 80b. Although in FIG. 1 the storage system is depicted as being coupled to both the application system and the database system, in many installations separate storage systems will be provided for each of the application system and the database system. Another network 2b is dedicated to data transfer between the application and database system and the storage system. The communication protocol for the storage system will often be Fibre Channel (FC), network file system (NFS) or other file systems such as iSCSI or other IP-storage protocols. While FIG. 1 illustrates the system as encompassing only a single application system 10b and database system 40b, in many conventional implementations there are configurations in which several application system and several database systems are interconnected.
In FIG. 1 the primary components of the application system include a query requester 20b that, in response typically to a user request, creates and sends a query to the database system 40b through the local area network 1b. The application system also typically includes some means for receiving the results 30b, typically through the LAN connection 35b. A typical prior art system the database system 40b includes a query receiving means 50b for receiving queries from the application system 20b through the LAN. It also includes query executing means 60b to analyze the content of the query and execute the appropriate processes. Once the answer to the query has been determined, a process for returning the results 70b returns the result of the query to the application system 10b so that the answer to the query may be presented to the user.
Application and database systems such as depicted in FIG. 1 are capable of handling enormous amounts of data, for example, as might be found in a bank or an airline reservation system. This enormous amount of data is stored in a storage system 80b which includes database volumes 81b, which manages the database files 82b. The database files contain the actual data, such as the ticket numbers of all the passengers on a given flight.
The system such as depicted in FIG. 1 operates by having a query 5b sent from the application system to the database system through the local area network, or other network. As shown by arrow 7b, the database system then interacts with the storage system to retrieve the desired information, and return it as shown by arrow 6b over the local area network back to the application system. In FIG. 1 the most significant processes with regard to the invention described below are shown in the darker rectangles. These processes include sending the query 25b (or the query in the form of data), receiving the query (or the query in the form of data) 55b, returning the result data 75b, and receiving the result data 35b. 
A substantial disadvantage of the system depicted in FIG. 1 is the requirement that the data flow back and forth over the local area network. When the result from the database system to be provided to the application system contains a large quantity of data, the local area network becomes a bottleneck for overall performance. For example, if the query is for a list of all of the passengers who have traveled on a particular airline in the last ten years, a very large amount of data will be retrieved. In these situations, the large amount of data required to traverse the network limits the operating speed of the overall database system. In addition, although less frequently, sometimes the query itself contains a large amount of data and this also creates a bottleneck.
Accordingly, what is needed is a system for implementing queries of databases which avoids the bottlenecks introduced by sending the query over a local area network, or retrieving large amounts of data in response to the query over the network.